﻿using System;
using System.Web.UI.HtmlControls;
using ebay.BLL;

public partial class UI_Mail_Message : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e) {
        if (!IsPostBack) {   
            MenuFlagManage manage = new MenuFlagManage();

            if (manage.LoadMenuFlagSource()) {
                // Add menu flag's css code
                HtmlGenericControl control = new HtmlGenericControl("style");
                
                control.Attributes.Add("type", "text/css");
                control.InnerHtml = manage.GetMenuFlagCss();

                Page.Header.Controls.Add(control);

                // Add menu flag's html code
                menuFlag.InnerHtml = manage.GetMenuFlagHtml();
                menuFlagHeader.InnerHtml = manage.GetMenuFlagHtml();
            } 
        }
    }
}